package com.rd.student.ruanjian.class1.duhang.New00;

public class Pig extends Animal{

    public Pig(String name) {
        super(name);
    }

    @Override
    public void voice() {
        System.out.println(getName() + "呼呼大睡" );
    }

    @Override
    public void enjoy() {
        System.out.println(name + "呼呼");
    }

    @Override
    public String toString() {
        return "小猪" +
                "名字是" + name;
    }
}
